<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8"/>
  <title>订单列表</title>
  <link rel="stylesheet" href="/css/bootstrap.css" th:href="@{/css/bootstrap.css}"/>
</head>

<body class="container">
<br/>
<h1>订单列表</h1>
<br/><br/>
<div class="with:80%">
  <table class="table table-hover">
    <thead>
    <tr>
      <th>订单编号</th>
      <th>订单开始时间</th>
      <th>订单结束时间</th>
      <th>租房人</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr  th:each="indent : ${indents}">
      <th scope="row" th:text="${indent.id}"></th>
      <td th:text="${#dates.format(indent.begintime,'yyyy-MM-dd')}"></td>
      <td th:text="${#dates.format(indent.endtime,'yyyy-MM-dd')}"></td>
      <a th:each="user : ${user}">
        <td th:text="${user.username}"></td>
      </a>
      <td><a th:href="@{/order/orderDetail(id = ${indent.id})}">订单详情</a></td>
      <!--            <td th:text="${indent.userId}"></td>-->
      <!--            <td th:text="${indent.apartmentId}"></td>-->
    </tr>
    </tbody>
  </table>
</div>
<div class="form-group">
  <div class="col-sm-2 control-label" >
    <a th:href="@{/user/userHomePage(username=${user.username})}" class="btn btn-info">返回</a>
  </div>
</div>
</body>
</html>